//
//  AboutUsViewController.m
//  OurRelaxDemo
//
//  Created by 王雅蓉 on 15/7/1.
//  Copyright (c) 2015年 于宾尧. All rights reserved.
//

#import "AboutUsViewController.h"

@interface AboutUsViewController ()
@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIImageView *imageview = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 40, 40)];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction:)];
    NSMutableArray *array = [NSMutableArray array];
    
    for (NSInteger i = 1; i < 6; i++) {
        NSString *str = [NSString stringWithFormat:@"%ld", i];
        UIImage *image = [UIImage imageNamed:str];
        [array addObject:image];
    }
    imageview.animationImages = array;
    imageview.animationDuration = 0.5;
    imageview.animationRepeatCount = 0;
    [imageview startAnimating];
    [imageview addGestureRecognizer:tap];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:imageview];
    [imageview release];
    [self.navigationItem.leftBarButtonItem release];
    [tap release];

    self.view.backgroundColor = [UIColor whiteColor];
    self.view11 = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"20141123124151_HVPnT.thumb.700_0.jpeg"]];
    self.view11.frame = CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height);
    self.view11.center = self.view.center;
    
    [self.view addSubview: self.view11];
    self.label1 = [[UILabel alloc]init];
    self.label1.text = @"清晨的第一缕阳光是朝阳给你的祝福： 离别后的雨是天空对你的思念，不要让寂寞笼罩你的心，不要让孤独占据思绪，不要将快乐拘之门外，不要被悲伤锁上心门，更不要把忧郁埋藏心里．\n<软件名>在你身边，永远支持你，你不孤单";
    
    self.label1.frame = CGRectMake(self.view.frame.origin.x + 30, self.view.frame.origin.y + 20 + 44 + 60  , self.view.frame.size.width * 0.7, self.view.frame.size.height * 0.2);
    //    self.label1.backgroundColor  = [UIColor orangeColor];
    self.label1.numberOfLines = 0;
    self.label1.textColor = [UIColor whiteColor];
    [self.label1 sizeToFit];
    
    [self.view addSubview:self.label1];
    
    
    self.label2 = [[UILabel alloc]init];
    
    self.label2.textColor = [UIColor whiteColor];
    //
    self.label2.text = @"王雅蓉、于宾尧、张壮、何燚 \n       ------研发组全体敬上";
    if ([[UIScreen mainScreen] bounds].size.width >= 375) {
        
        self.label2.frame = CGRectMake(self.view.frame.origin.x + 150, self.view.frame.origin.y + [[UIScreen mainScreen] bounds].size.height - 180 , self.view.frame.size.width + 160, self.view.frame.size.height + 100);
        
    } else {
    
        self.label2.frame = CGRectMake([[UIScreen mainScreen] bounds].size.width - 230, [[UIScreen mainScreen] bounds].size.height - 80, 230, 80);
    }
    //    self.label2.frame = CGRectMake(200, 200, 200, 200);
    //    self.label2.backgroundColor = [UIColor orangeColor];
    self.label2.numberOfLines = 0;
    [self.label2 sizeToFit];
    [self.view addSubview:self.label2];

}
#pragma mark 抽屉, 可以设置成动画效果
- (void)tapAction:(UITapGestureRecognizer *)tap
{
    [self.navigationController presentLeftMenuViewController:self];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
